/*
	QUBE
	Sandra Obermann - QPT 1 - 2012
	fhs33730 - 1110601021
	FH Salzburg - Studiengang MultiMediaTechnolgy
*/

#ifndef QUBE_H_INCLUDED
#define QUBE_H_INCLUDED

// Cinder Includes
#include "cinder/app/AppBasic.h"

// Forward declaration to avoid cyclic inludes
class DataManager;

// Enum for Qube moving directions
enum QUBE_MOVEMENT
{
	E_QUBE_MOVE_UP = 0,
	E_QUBE_MOVE_DOWN,
	E_QUBE_MOVE_RIGHT,
	E_QUBE_MOVE_LEFT,
};

// My QUBE Class
class QUBE
{
public:

	// Default QUBE Constructor/Destructor
	QUBE( int qubeSize );
	~QUBE();

	// QUBE Drawing
	void			setup();
	void			update( float deltaTime );
	void			draw() const;

	// QUBE Movement
	void			moveToDir( QUBE_MOVEMENT dir);
	void			setMoveQube( bool moveQube = true );
	void			setSlideDown( bool slideSown = true );
	void			setInputDirection( ci::Vec3f inputDirection );
	void			setToRotationAngle( float rotationAngle );

	bool			getMoveQube() const;
	ci::Vec3f		getQubePosition() const;
	void			setQubePosition( ci::Vec3f position );

private:

	// QUBE Color Management
	void			updateColor( float deltaTime );
	unsigned int	m_CurrentQubeColorIndex;
	float			m_CurrentQubeRotationAngle;
	float			m_CurrentQubeColorTimer;
	ci::Color		m_CurrentQubeColor;

	// QUBE Movement
	bool			m_SlideDown;
	bool			m_MoveQube;
	float			m_ToRotationAngle;
	ci::Vec3f		m_QubeInputDirection;

	// QUBE Properties
	int				m_QubeSize;
	ci::Vec3f		m_QubePosition;

	// Data Manager
	DataManager*	m_DataManager;
};

#endif // QUBE_H_INCLUDED